<?php
require_once('tpl/head.php');
include_once('./system/dbConn.php');
connect();
$key=$_GET["key"];
$sql0="select * from videos where videoname like '%{$key}%'";
$result0=mysql_query($sql0);
$num=mysql_num_rows($result0);
?>


<div class="container">

    <div class="row row-offcanvas row-offcanvas-right">

        <div class="col-xs-12 col-sm-9">


            <div class="row">


                <div class="col-xs-12 col-lg-12 mlist">
                    <h2>搜索结果</h2>
                    <?php 
                    if ($num!=0) {?>
                         <ul class="list-inline row text-center">
                        <?php                       
                        while($row0=mysql_fetch_assoc($result0)){
                         ?>
                        
                        <li class="col-xs-6 col-lg-3">
                            <img src="./posters/<?php echo $row0["pic"] ?>" class="responsive img-thumbnail"/>

                            <p><a href="show.php?vid=<?php echo $row0["vid"] ?>"><?php echo $row0["videoname"]; ?></a>
                            </p>
                        </li>
                        <?php }?>

                    </ul>
                    <?php    
                    }
                    else
                        echo "未找到符合条件的记录!";
                     ?>
                   


                </div>
                <!--/.col-xs-6.col-lg-4-->

            </div>
            <!--/row-->
        </div>
        <!--/.col-xs-12.col-sm-9-->

        
        <!--/.sidebar-offcanvas-->
    </div>
    <!--/row-->

    

</div>
<!--/.container-->
<?php
require_once('tpl/foot.php');
?>
